﻿<UserControl x:Class="PhotoKiosk.View.PaperSelectView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:m="clr-namespace:PhotoKiosk.Model"
             xmlns:resx="clr-namespace:PhotoKiosk.Properties"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="7*" />
            <RowDefinition Height="40" />
            <RowDefinition Height="*" />
            <RowDefinition Height="20" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="40"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="40"/>
                <ColumnDefinition Width="4*" />
                <ColumnDefinition Width="40"/>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="20" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" >
                    <Label Content="{x:Static resx:Resources.Text_Error_Most_Select_Frame}" HorizontalContentAlignment="Center" FontSize="13">
                        <Label.Style>
                            <Style TargetType="Label">
                                <Setter Property="Foreground" Value="Transparent"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsPaperFrameSelectedErrorColor}" Value="false">
                                        <Setter Property="Foreground" Value="Red" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Label.Style>
                    </Label>
                    <GroupBox Header="{x:Static resx:Resources.FrameType}" FontSize="25" >
                        <GroupBox.Style>
                            <Style TargetType="{x:Type GroupBox}">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="{x:Type GroupBox}">
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="*" />
                                                </Grid.RowDefinitions>
                                                <Border Grid.Row="0" BorderThickness="1" BorderBrush="{TemplateBinding Background}" Background="{TemplateBinding Background}">
                                                    <Label Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center">
                                                        <ContentPresenter ContentSource="Header" RecognizesAccessKey="True" />
                                                    </Label>
                                                </Border>
                                                <Border Grid.Row="1" BorderThickness="1,0,1,1" BorderBrush="{TemplateBinding Background}">
                                                    <ContentPresenter Margin="4" />
                                                </Border>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Foreground" Value="White"/>
                                <Setter Property="Background" Value="#55000000"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsPaperFrameSelectedErrorColor}" Value="false">
                                        <Setter Property="Foreground" Value="Red" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </GroupBox.Style>
                        <ItemsControl ItemsSource="{Binding PaperFramesViewModels, Mode=OneWay}"/>
                    </GroupBox>
                </StackPanel>
                <StackPanel  Grid.Row="2">
                    <Label Content="{x:Static resx:Resources.Text_Error_Most_Select_Paper_Type}" HorizontalContentAlignment="Center" FontSize="13">
                        <Label.Style>
                            <Style TargetType="Label">
                                <Setter Property="Foreground" Value="Transparent"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsPaperTypeSelectedErrorColor}" Value="false">
                                        <Setter Property="Foreground" Value="Red" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Label.Style>
                    </Label>
                    <GroupBox Header="{x:Static resx:Resources.PaperType}" FontSize="25">
                        <GroupBox.Style>
                            <Style TargetType="GroupBox">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="GroupBox">
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="*" />
                                                </Grid.RowDefinitions>
                                                <Border Grid.Row="0" BorderThickness="1" BorderBrush="{TemplateBinding Background}" Background="{TemplateBinding Background}">
                                                    <Label Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center">
                                                        <ContentPresenter ContentSource="Header" RecognizesAccessKey="True" />
                                                    </Label>
                                                </Border>
                                                <Border Grid.Row="1" BorderThickness="1,0,1,1" BorderBrush="{TemplateBinding Background}">
                                                    <ContentPresenter Margin="4" />
                                                </Border>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Foreground" Value="White"/>
                                <Setter Property="Background" Value="#55000000"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsPaperTypeSelectedErrorColor}" Value="false">
                                        <Setter Property="Foreground" Value="Red" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </GroupBox.Style>
                        <ItemsControl ItemsSource="{Binding PaperTypesViewModels}"/>
                    </GroupBox>
                </StackPanel>
            </Grid>

            <StackPanel  Grid.Column="3">
                <Label Content="{x:Static resx:Resources.Text_Error_Most_Select_Paper_Size}" HorizontalContentAlignment="Center" FontSize="13">
                    <Label.Style>
                        <Style TargetType="Label">
                            <Setter Property="Foreground" Value="Transparent"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsPaperSizeSelectedErrorColor}" Value="false">
                                    <Setter Property="Foreground" Value="Red" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Label.Style>
                </Label>
                <GroupBox Header="{x:Static resx:Resources.PhotoSize}" FontSize="25">
                    <GroupBox.Style>
                        <Style TargetType="GroupBox">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="GroupBox">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>
                                            <Border Grid.Row="0" BorderThickness="1" BorderBrush="{TemplateBinding Background}" Background="{TemplateBinding Background}">
                                                <Label Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center">
                                                    <ContentPresenter ContentSource="Header" RecognizesAccessKey="True" />
                                                </Label>
                                            </Border>
                                            <Border Grid.Row="1" BorderThickness="1,0,1,1" BorderBrush="{TemplateBinding Background}">
                                                <ContentPresenter Margin="4" />
                                            </Border>
                                        </Grid>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="White"/>
                            <Setter Property="Background" Value="#55000000"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsPaperSizeSelectedErrorColor}" Value="false">
                                    <Setter Property="Foreground" Value="Red" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </GroupBox.Style>
                    <ItemsControl ItemsSource="{Binding PaperSizeViewModels}" Margin="0,0,0,0">
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <UniformGrid Columns="4" />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                    </ItemsControl>
                </GroupBox>
            </StackPanel>
        </Grid>
        <Button Grid.Row="3" Command="{Binding FinishCommand}" Margin="0,0,10,10" Background="#FF4C7D99" Height="60" Width="180" VerticalAlignment="Bottom" HorizontalAlignment="Right">
            <StackPanel Orientation="Horizontal">
                <Label Content="{x:Static resx:Resources.Next}"  HorizontalContentAlignment="Center" VerticalAlignment="Center" FontSize="25"/>
                <Image Source="Images/Next.png" Height="50" />
            </StackPanel>
        </Button>
    </Grid>
</UserControl>
